<template>
  <div id="selemenu-box" class="selemenuBox-deppon">
    <Input
      v-model="search.value"
      icon="ios-search-strong"
      :placeholder="placeholder"
      @on-click="query"
      @on-enter="query"
    >
    <Select v-model="search.select" slot="prepend" style="width: 85px;">
      <Option v-for="(item,index) in search.option" :key="index" :value="item.value">{{item.html}}</Option>
    </Select>
    </Input>
    <inputBlank left="86px" top="47px" :html="placeholder" :display="childInput.display">
    </inputBlank>
  </div>
</template>

<script>
  import inputBlank from '../comcomponnet/inputBlank';
  import {checkWaybillV1,trimKG,getStyle,checkPeople} from '../../utils/utils'
    export default {
        name: "selemenubox-com",
        data(){
          return {
            search:{
              option:[
                {value:'order',html:'运单/订单',placeholder:'请输入运单/订单'},
                {value:'department',html:'部门',placeholder:'请输入部门名称'},
                {value:'person',html:'人员',placeholder:'请输入姓名/工号/手机'}
              ],
              select: 'order',
              value: ''
            },
            childInput:{
              display:'none'
            },
            searchNull:false,
            zjmultiplequery:''
          }
        },
        computed:{
          placeholder(){
            for (let v of this.search.option){
              if(v.value === this.search.select){
                return v.placeholder;
              }
            }
          }
        },
        methods:{
          showInputBlank(){
            this.childInput.display = 'block';
            setTimeout(()=> {
              this.childInput.display = 'none'
            },1500)
          },
          query(){
            if(this.search.value === ''){
              this.showInputBlank();
            }else{
              switch (this.search.select){
                case 'order':
                  this.queryMul();
                  break;
                case 'department':
                  this.queryAddressListByDept();
                  break;
                case 'person':
                  this.queryAddressListByName();
                  break;
              }
            }
          },
          queryEcsMul(e) {
            // document.querySelectorAll('.gjmultiple')[0].innerHTML = '';
            // document.querySelectorAll('.gzjlmultiple')[0].innerHTML = '';
            // $(".gjmultiple").empty();
            // $(".gzjlmultiple").empty();
            let waybillNodata = {
              'waybillNo': e
            };
            let conditiondata = {
              'condition': waybillNodata
            };
            let waybillVodata = {
              'waybillVo': conditiondata
            };
            let requestcss = JSON.stringify(waybillVodata);
            this.axios.post(
              ECS_BASE_MUL_PATH+"qmc-query-web/zsource/searchWaybillInfoByWaybillNo.action",
              requestcss
            ).then((res)=>{
              let r = res.data;
              if(null==r.waybillVo||'undefined'===r.waybillVo){
                console.log("跟踪记录内容为空！");
              }else{
                document.querySelectorAll('.csssuper')[0].style.display = 'block';
                // $('.csssuper').slideDown();
                this.$emit('search-WaybillNoReultDto',r.waybillVo.waybillInfoByWaybillNoReultDto);
                // $.multiplecss(r.waybillVo.waybillInfoByWaybillNoReultDto);
              }
              //dealShowFirstMenu();
            }).catch((httpRequest)=>{
              //$(".input-tip").css("display","block")
              //$(".input-tip").html("调用ECS运单接口失败！");
              console.log("调用ECS运单接口失败！");
            });

            // $.ajax({
            //   url: ECS_BASE_MUL_PATH+"qmc-query-web/zsource/searchWaybillInfoByWaybillNo.action",
            //   type: "POST",
            //   dataType: "json",
            //   contentType: "application/json",
            //   data: requestcss,
            //   success: function (r) {
            //     if(null==r.waybillVo||'undefined'==r.waybillVo){
            //       console.log("跟踪记录内容为空！");
            //     }else{
            //       $('.csssuper').slideDown();
            //       $.multiplecss(r.waybillVo.waybillInfoByWaybillNoReultDto);
            //     }
            //
            //     //dealShowFirstMenu();
            //   },
            //   error: function (httpRequest) {
            //     //$(".input-tip").css("display","block")
            //     //$(".input-tip").html("调用ECS运单接口失败！");
            //     console.log("调用ECS运单接口失败！");
            //   }
            // });
            this.axios.post(
              ECS_BASE_MUL_PATH+"qmc-query-web/zsource/searchWaybillNbgjByWaybillNo.action",
              requestcss
            ).then((res)=>{  //wayBIllNoLocusList
              let r = res.data;
              //queryecsdictory(r.waybillVo.wayBIllNoLocusList);
              //$(".gjmultiple").nextAll().remove();
              // this.multiplegjecs(r.waybillVo.wayBIllNoLocusList);
              this.$emit('get-wayBIllNoLocusList',r.waybillVo.wayBIllNoLocusList);
              document.querySelectorAll('.csssuper')[0].style.display = 'block';
              // $('.csssuper').slideDown();
            }).catch((httpRequest)=>{
              //$(".input-tip").css("display","block")
              //$(".input-tip").html("调用ECS运单轨迹接口失败！");
              console.log("调用ECS运单轨迹接口失败！");
            });
            // $.ajax({
            //   url: ECS_BASE_MUL_PATH+"qmc-query-web/zsource/searchWaybillNbgjByWaybillNo.action",
            //   type: "POST",
            //   dataType: "json",
            //   contentType: "application/json",
            //   data: requestcss,
            //   success: function (r) {  //wayBIllNoLocusList
            //     //queryecsdictory(r.waybillVo.wayBIllNoLocusList);
            //     //$(".gjmultiple").nextAll().remove();
            //     $.multiplegjecs(r.waybillVo.wayBIllNoLocusList);
            //     $('.csssuper').slideDown();
            //   },
            //   error: function (httpRequest) {
            //     //$(".input-tip").css("display","block")
            //     //$(".input-tip").html("调用ECS运单轨迹接口失败！");
            //     console.log("调用ECS运单轨迹接口失败！");
            //   }
            // });
            this.axios.post(
              ECS_BASE_MUL_PATH+"qmc-query-web/zsource/queryWayBilllTrackRecords.action",
              requestcss
            ).then((res)=>{
              let r = res.data;
              let trackRlMsg = r.message;
              if('服务端未知异常'===trackRlMsg){
                console.log("悟空跟踪记录接口调用失败！");
              }else{
                //$(".gjmultiple tbody").remove();
                this.$emit('get-trackRecordList',r.waybillVo.trackRecordList);
                document.querySelectorAll('.csssuper')[0].style.display = 'block';
                // $.multiplegzjl(r.waybillVo.trackRecordList);
                // $('.csssuper').slideDown();
              }
            }).catch((httpRequest)=>{
              //$(".input-tip").css("display","block")
              //$(".input-tip").html("调用ECS运单轨迹接口失败！");
              //$(".multiplequerywaybillno").addClass('error');
              console.log("调用ECS运单轨迹接口失败！");
            });

            // $.ajax({
            //   url: ECS_BASE_MUL_PATH+"qmc-query-web/zsource/queryWayBilllTrackRecords.action",
            //   type: "POST",
            //   dataType: "json",
            //   contentType: "application/json",
            //   data: requestcss,
            //   success: function (r) {
            //     var trackRlMsg = r.message;
            //     if('服务端未知异常'==trackRlMsg){
            //       console.log("悟空跟踪记录接口调用失败！");
            //     }else{
            //       //$(".gjmultiple tbody").remove();
            //       $.multiplegzjl(r.waybillVo.trackRecordList);
            //       $('.csssuper').slideDown();
            //     }
            //   },
            //   error: function (httpRequest) {
            //     //$(".input-tip").css("display","block")
            //     //$(".input-tip").html("调用ECS运单轨迹接口失败！");
            //     //$(".multiplequerywaybillno").addClass('error');
            //     console.log("调用ECS运单轨迹接口失败！");
            //   }
            // });

            // $.extend({
            //   multiplecss: function (rs) {
            //     $(rs).each(function (i, d) {
            //       for(var k in d) {
            //         var ss = $("."+k)[0];
            //         if(ss=="undefined"||null==ss){
            //         }else{
            //           if(d[k]!=null){
            //             if(d[k]!=""){
            //               $("."+k).html(d[k]);
            //             }
            //           }
            //         }
            //       }
            //     })
            //   }
            // });

            // $.extend({
            //   multiplegzjl: function (rs) {
            //     var lis = "";
            //     $(rs).each(function (i, d) {
            //       if(null==d){
            //         return;
            //       }
            //       var createTimeStr = d.createTime+"";
            //
            //       if(createTimeStr!=null&&createTimeStr!=''){
            //         if(createTimeStr>999999999){
            //           createTimeStr = parseInt(createTimeStr/1000);
            //         }
            //       }
            //
            //       var acceptedTimeStr = d.acceptedTime+"";
            //
            //       if(acceptedTimeStr!=null&&acceptedTimeStr!=''){
            //         if(acceptedTimeStr>999999999){
            //           acceptedTimeStr = parseInt(acceptedTimeStr/1000);
            //         }
            //       }
            //
            //
            //       var unixTimestamp = new Date( createTimeStr*1000 ) ;
            //       var commonTime = unixTimestamp.toLocaleString();
            //       var datestrformate = commonTime.split("&");
            //       var unixTimestampsl = new Date( acceptedTimeStr*1000 ) ;
            //       var commonTimesl = unixTimestampsl.toLocaleString();
            //       var datestrformatesl = commonTimesl.split("&");
            //
            //       var qctime ="";
            //       (null == d.createTime) ? qctime = "" : qctime =  "<label>起草</label>"+datestrformate[0]+" "+datestrformate[1];
            //
            //       var sltime="";
            //       (null == d.acceptedTime) ? sltime = "" : sltime = "<label>受理</label>"+datestrformatesl[0]+" "+datestrformatesl[1];
            //
            //       var contentgzjl = d.trackContent;
            //       (null == d.trackContent) ? contentgzjl = "" : contentgzjl = d.trackContent;
            //
            //       var createOrgNamegzjl = d.createOrgName;
            //       (null == d.createOrgName) ? createOrgNamegzjl = "" : createOrgNamegzjl = d.createOrgName;
            //
            //       var acceptedOrgNamegzjl = d.acceptedOrgName;
            //       (null == d.acceptedOrgName) ? acceptedOrgNamegzjl = "" : acceptedOrgNamegzjl = d.acceptedOrgName;
            //
            //       var imgstrone =  "<img src='resources/img/multiple/mul-zdfour-gzjl.png' />";
            //
            //       lis ="<TR class='full'><TD class='trajectory-font'>"+imgstrone+"<span title=' "+contentgzjl+" '>"+controlLength(contentgzjl,30)+"</span></TD><TD class='trajectory-info dept'><span>"+qctime+"</span><p>"+controlLength(createOrgNamegzjl,14)+"</p></TD>"+"</TD><TD class='trajectory-info'><span>"+sltime+"</span><p>"+controlLength(acceptedOrgNamegzjl,14)+"</p></TD></TR>";
            //
            //       $(".gzjlmultiple").prepend(lis);
            //     })
            //     return lis;
            //
            //   }
            // });

            // $.extend({
            //   multiplegjecs: function (rs) {
            //     var lis = "";
            //
            //     $(rs).each(function (i, d) {
            //       var imgstrone =  "<img src='resources/img/multiple/mul-zdthree.png' />";
            //       var topstr = "bottom";
            //       var blackcss ="";
            //       if(i==0){
            //         imgstrone =  "<img src='resources/img/multiple/mul-zdone.png' />";
            //         blackcss =" black";
            //       }
            //
            //       var operateTimeStr = d.operateTime;
            //
            //       if(operateTimeStr!=null&&operateTimeStr!=''){
            //         if(operateTimeStr>999999999){
            //           operateTimeStr =parseInt(operateTimeStr/1000) ;
            //         }
            //       }
            //
            //       var unixTimestamp = new Date( operateTimeStr*1000 ) ;
            //       var commonTime = unixTimestamp.toLocaleString();
            //       var datestrformate = commonTime.split("&");
            //
            //       var hwgjstr = queryGjhwzt(d.currentStatus);
            //       var czgjstr = queryGjczzt(d.operateTypeName);
            //
            //       lis ="<TR class='full'><TD class='trajectory-time'><p>"+datestrformate[0]+"</p><span>"+datestrformate[1]+"</span> </TD><TD class='trajectory-font"+blackcss+"'>"+imgstrone+"<span class=\'css "+d.currentStatus+"\'  title='"+hwgjstr+"'>"+hwgjstr+"</span><span class='css'><label class='operateOrgName' title='"+d.operateOrgName+"'>"+" "+d.operateOrgName+"</label><label class='operateName' title='"+d.operateName+"'>"+d.operateName+"</label><label class='czgjstr' title='"+czgjstr+"'>"+czgjstr+"</label></span></TD></TR>";
            //       $(".gjmultiple").append(lis);
            //
            //     })
            //     return lis;
            //   }
            // });

            // queryecsdictory 未用到的函数

            // function queryecsdictory(rs) {
            //   var dicurl =ECS_BASE_MUL_PATH+"qmc-query-web/dict/loadDictionaryByType.action";
            //   dicurl += "&code="+"GOODS_TYPE";
            //
            //   if(rs==null||rs==''){
            //
            //   }else{
            //     $.ajax({
            //       url: dicurl,
            //       type: "GET",
            //       dataType: "json",
            //       contentType: "application/json",
            //       async : "false",
            //       success: function (r) {
            //         $(rs).each(function (i, d) {
            //           var currentstatus =  d.currentStatus;
            //           var datadictoryinner = r.dictionaryVo.dictionaryList;
            //           for(var k in datadictoryinner) {
            //             var dicstr = datadictoryinner[k].valueCode;
            //             if(currentstatus==dicstr){
            //               var imgstrone =  "<img src='resources/img/multiple/mul-zdthree.png' />";
            //               var topstr = "bottom";
            //               var blackcss ="";
            //               if(i==0){
            //                 imgstrone =  "<img src='resources/img/multiple/mul-zdone.png' />";
            //                 topstr ="top";
            //                 blackcss =" black";
            //               }
            //
            //               var operateTimeStr = d.operateTime;
            //
            //               if(operateTimeStr!=null&&operateTimeStr!=''){
            //                 if(operateTimeStr>999999999){
            //                   operateTimeStr = parseInt(operateTimeStr/1000) ;
            //                 }
            //               }
            //
            //               var unixTimestamp = new Date( operateTimeStr*1000 ) ;
            //               var commonTime = unixTimestamp.toLocaleString();
            //               var datestrformate = commonTime.split("&");
            //
            //               lis ="<TR class='full'><TD class='trajectory-time'><p>"+datestrformate[0]+"</p><span>"+datestrformate[1]+"</span> </TD><TD class='trajectory-font"+blackcss+"'>"+imgstrone+"<span class='css'>"+datadictoryinner[k].valueName+" "+d.operateTypeName+" "+d.operateOrgName+"</span></TD></TR>";
            //               $(".gjmultiple").append(lis);
            //             }
            //           }
            //         })
            //       },
            //       error: function (httpRequest) {
            //         console.log("ECS服务未知异常！");
            //       }
            //     });
            //   }
            //
            // };
          },
          queryFossMul(e) {
            console.log("调用FOSS综合查询-【运单号】："+e);
            // $(".gjmultiple").empty();
            // $(".gzjlmultiple").empty();
            let waybillNodata = {
              'waybillNo':  e
            };
            let conditiondata = {
              'condition': waybillNodata
            };
            let waybillVodata = {
              'waybillVo': conditiondata
            };
            let requestcss = JSON.stringify(waybillVodata);
            //timeout = 6000
            this.axios.post(
              FOSS_BASE_MUL_PATH+"bse-querying-web/querying/searchWaybillInfoByWaybillNo.action",
              requestcss
            ).then((res)=>{
              let r = res;
              let returnMes = r.message;
              if('无法检索到运单。'=== returnMes){
                console.log("无法检索到此运单结果!");
                //$(".input-tip").css("display","block");
                //$(".input-tip").html("系统无法检索到运单");
                // $(".multiplequerywaybillno").addClass('error');
                this.zjmultiplequery='';
                // $('.csssuper').slideUp();
                document.querySelectorAll('.csssuper')[0].style.display = 'none';
                document.querySelectorAll('.search-null')[0].style.display = 'block';
                // $(".search-null").slideDown("500");
//            	$(".csssuper").css("display","none");
                //dealShowFirstMenu();
              }else{
                document.querySelectorAll('.csssuper')[0].style.display = 'block';
                document.querySelectorAll('.search-null')[0].style.display = 'none';
                // $(".search-null").slideUp("500");
                // $('.csssuper').slideDown();
                this.$emit('search-WaybillNoReultDto',r.waybillVo.waybillInfoByWaybillNoReultDto);
                // $.multiplecss(r.waybillVo.waybillInfoByWaybillNoReultDto);
                //$(".gjmultiple tbody").remove();
                this.$emit('get-multiplegj',r.waybillVo.wayBIllNoLocusList);
                // $.multiplegj(r.waybillVo.wayBIllNoLocusList);
                //dealShowFirstMenu();
              }
            }).catch((httpRequest)=>{
              document.querySelectorAll('.csssuper')[0].style.display = 'none';
              // $('.csssuper').slideUp();
              console.log("waybill提交未知异常！");
              showMsg("warn","系统在维护中！");
              }
            );
//             $.ajax({
//               url: FOSS_BASE_MUL_PATH+"bse-querying-web/querying/searchWaybillInfoByWaybillNo.action",
//               type: "POST",
//               dataType: "json",
//               contentType: "application/json",
//               timeout : timeoutcss,
//               //data: {"waybillVo.condition.waybillNo":e},
//               data: requestcss,
//               success: function (r) {
//                 var returnMes = r.message;
//                 if('无法检索到运单。'== returnMes){
//                   console.log("无法检索到此运单结果!");
//                   //$(".input-tip").css("display","block");
//                   //$(".input-tip").html("系统无法检索到运单");
//                   // $(".multiplequerywaybillno").addClass('error');
//                   zjmultiplequery='';
//                   $('.csssuper').slideUp();
//                   $(".search-null").slideDown("500");
// //            	$(".csssuper").css("display","none");
//                   //dealShowFirstMenu();
//                 }else{
//                   $(".search-null").slideUp("500");
//                   $('.csssuper').slideDown();
//                   $.multiplecss(r.waybillVo.waybillInfoByWaybillNoReultDto);
//                   //$(".gjmultiple tbody").remove();
//                   $.multiplegj(r.waybillVo.wayBIllNoLocusList);
//                   //dealShowFirstMenu();
//                 }
//               },
//               error: function (httpRequest) {
//                 $('.csssuper').slideUp();
//                 console.log("waybill提交未知异常！");
//                 showMsg("warn","系统在维护中！");
//               }
//             });
            this.axios.post(
              FOSS_BASE_MUL_PATH+"bse-querying-web/querying/queryWayBilllTrackRecords.action",
              requestcss
            ).then((res)=>{
              let r = res.data;
              this.$emit('get-multiplegzjlfoss',r.waybillVo.trackRecordList)
              // $.multiplegzjlfoss(r.waybillVo.trackRecordList);
            }).catch((httpRequest)=>{
              console.log("waybill提交未知异常！");
            })


            // $.ajax({
            //   url: FOSS_BASE_MUL_PATH+"bse-querying-web/querying/queryWayBilllTrackRecords.action",
            //   type: "POST",
            //   dataType: "json",
            //   contentType: "application/json",
            //   //data: {"waybillVo.condition.waybillNo":e},
            //   data: requestcss,
            //   success: function (r) {
            //     $.multiplegzjlfoss(r.waybillVo.trackRecordList);
            //   },
            //   error: function (httpRequest) {
            //     console.log("waybill提交未知异常！");
            //   }
            // });



            // $.extend({
            //   multiplecss: function (rs) {
            //     $(rs).each(function (i, d) {
            //       for(var k in d) {
            //         var ss = $("."+k)[0];
            //         if(ss=="undefined"||null==ss){
            //         }else{
            //           if(d[k]!=null){
            //             if(d[k]!=""){
            //               $("."+k).html(d[k]);
            //             }
            //           }
            //         }
            //       }
            //     })
            //   }
            // });

            // $.extend({
            //   multiplegj: function (rs) {
            //     //$(".gjmultiple").nextAll().remove();
            //     var lis = "";
            //     var sumsize = 0 ;
            //     if(null==rs||'undefined'==rs){
            //
            //     }else{
            //       sumsize = rs.length-2
            //     }
            //
            //     $(rs).each(function (i, d) {
            //       if(null==d){
            //         return;
            //       }
            //       var imgstrone =  "<img src='/static/resources/img/multiple/mul-zdthree.png' />";
            //       var topstr = "bottom";
            //       var blackcss ="";
            //
            //       if(i==sumsize){
            //         imgstrone =  "<img src='/static/resources/img/multiple/mul-zdone.png' />";
            //         topstr ="top";
            //         blackcss =" black";
            //
            //       }
            //       var operateTimeStr = d.operateTime;
            //
            //       if(operateTimeStr!=null&&operateTimeStr!=''){
            //         if(operateTimeStr>999999999){
            //           operateTimeStr =parseInt(operateTimeStr/1000) ;
            //         }
            //       }
            //
            //       var unixTimestamp = new Date( operateTimeStr*1000 ) ;
            //       var commonTime = unixTimestamp.toLocaleString();
            //       var datestrformate = commonTime.split("&");
            //       lis ="<TR class='full'><TD class='trajectory-time'><p>"+datestrformate[0]+"</p><span>"+datestrformate[1]+"</span> </TD><TD class='trajectory-font"+blackcss+"'>"+imgstrone+"<span class=\'css "+d.currentStatus+"\' title='"+d.currentStatus+"'>"+d.currentStatus+"</span><span class='css'><label class='operateOrgName' title='"+d.operateOrgName+"'>"+" "+d.operateOrgName+"</label><label class='operateName' title='"+d.operateName+"'>"+d.operateName+"</label><label class='operateTypeName' title='"+d.operateTypeName+"'>"+d.operateTypeName+"</label></span></TD></TR>";
            //
            //       $(".gjmultiple").prepend(lis);
            //
            //     })
            //     return lis;
            //   }
            // });

            $.extend({
              multiplegzjlfoss: function (rs) {
                var lis = "";
                $(rs).each(function (i, d) {
                  if(null==d){
                    return;
                  }

                  var createTimeStr = d.createTime+"";

                  if(createTimeStr!=null&&createTimeStr!=''){
                    if(createTimeStr>999999999){
                      createTimeStr = parseInt(createTimeStr/1000) ;
                    }
                  }

                  var acceptedTimeStr = d.acceptedTime+"";

                  if(acceptedTimeStr!=null&&acceptedTimeStr!=''){
                    if(acceptedTimeStr.length>10){
                      acceptedTimeStr = parseInt(acceptedTimeStr/1000);
                    }
                  }

                  var unixTimestamp = new Date( createTimeStr*1000 ) ;
                  var commonTime = unixTimestamp.toLocaleString();
                  var datestrformate = commonTime.split("&");
                  var unixTimestampsl = new Date( acceptedTimeStr*1000 ) ;
                  var commonTimesl = unixTimestampsl.toLocaleString();
                  var datestrformatesl = commonTimesl.split("&");

                  var qctime ="";
                  (null == d.createTime) ? qctime = "" : qctime =  "<label>起草</label>"+datestrformate[0]+" "+datestrformate[1];

                  var sltime="";
                  (null == d.acceptedTime) ? sltime = "" : sltime = "<label>受理</label>"+datestrformatesl[0]+" "+datestrformatesl[1];

                  var contentgzjl = d.trackContent;
                  (null == d.trackContent) ? contentgzjl = "" : contentgzjl = d.trackContent;

                  var createOrgNamegzjl = d.createOrgName;
                  (null == d.createOrgName) ? createOrgNamegzjl = "" : createOrgNamegzjl = d.createOrgName;

                  var acceptedOrgNamegzjl = d.acceptedOrgName;
                  (null == d.acceptedOrgName) ? acceptedOrgNamegzjl = "" : acceptedOrgNamegzjl = d.acceptedOrgName;

                  var imgstrone =  "<img src='resources/img/multiple/mul-zdfour-gzjl.png' />";

                  lis ="<TR class='full'><TD class='trajectory-font'>"+imgstrone+"<span title='"+contentgzjl+"'>"+controlLength(contentgzjl,30)+"</span></TD><TD class='trajectory-info dept'><span>"+qctime+"</span><p>"+controlLength(createOrgNamegzjl,14)+"</p></TD>"+"</TD><TD class='trajectory-info'><span>"+sltime+"</span><p>"+controlLength(acceptedOrgNamegzjl,14)+"</p></TD></TR>";

                  $(".gzjlmultiple").prepend(lis);
                })
                return lis;

              }
            });


          },
          queryMul() {
            let multiplequerywaybillno = trimKG(this.search.value);
            let mulcssstr = checkWaybillV1(multiplequerywaybillno,this.showInputBlank);
            if(mulcssstr===""){
              return;
            }
            if('YD'===mulcssstr){
              document.querySelectorAll('.csssuper-order')[0].style.display = 'none';
              setWaybillNoMul(multiplequerywaybillno);
              // let that = this;
              this.axios.post(
                FOSS_BASE_MUL_PATH+"bse-querying-web/login/queryBseSwitch4Ecs.action?waybillNo="+multiplequerywaybillno
              ).then((res)=>{
                let r = res.data;
                if("获取用户信息失败，请尝试清理Cookie或者重启浏览器!"===r){
                  showMsg('warn', '获取用户信息失败,请尝试清理Cookie或者重启浏览器！');
                  document.querySelectorAll('.csssuper')[0].style.display = 'none';
                  // $('.csssuper').slideUp();
                }else{
                  let ECSmul =ECS_BASE_MUL_PATH+"qmc-query-web/zsource/queryBseindex.action";
                  let FOSSmul =FOSS_BASE_MUL_PATH+"bse-querying-web/querying/integrativeQueryIndex.action?fullScreen=true";
                  let EFcsslisstr ="<h1>搜索结果</h1>" +
                    "<a class='multiple-EF-queryAll' " +
                    "href='JavaScript:void(0)'" +
                    "onclick=\"closeTab(\'"+FOSSmul+"\',\'DIV\');viewTab(\'" + "综合查询" + "\',\'" + FOSSmul + "\',\'DIV\',{\'waybillNumber\':"+multiplequerywaybillno+"})\">查看完整信息&gt;</a>"

                  if('Y' === r.ecsSwitch){

                    EFcsslisstr ="<h1>搜索结果</h1><a class='multiple-EF-queryAll' href='JavaScript:void(0)' onclick=\"closeTab(\'"+ECSmul+"\',\'DIV\');viewTab(\'" + "悟空-快递综合查询" + "\',\'" + ECSmul + "\',\'DIV\',{\'waybillNumber\':"+multiplequerywaybillno+"})\">查看完整信息&gt;</a>"
                    document.querySelectorAll('.multiple-EF-queryAll-title')[0].innerHTML = EFcsslisstr;
                    // $(".multiple-EF-queryAll-title").empty();
                    // $(".multiple-EF-queryAll-title").append(EFcsslisstr);
                    if(multiplequerywaybillno!==that.zjmultiplequery){
                      that.queryEcsMul(multiplequerywaybillno);
                    }else {
                      document.querySelectorAll('.csssuper')[0].style.display = 'block';
                      // $('.csssuper').slideDown();
                    }
                  }else{
                    document.querySelectorAll('.multiple-EF-queryAll-title')[0].innerHTML = EFcsslisstr;
                    // $(".multiple-EF-queryAll-title").empty();
                    // $(".multiple-EF-queryAll-title").append(EFcsslisstr);
                    if(multiplequerywaybillno!=this.zjmultiplequery){
                      that.queryFossMul(multiplequerywaybillno);
                    }else {
                      document.querySelectorAll('.csssuper')[0].style.display = 'block';
                      // $('.csssuper').slideDown();
                    }
                  }
                  that.zjmultiplequery = multiplequerywaybillno;
                }

              }).catch(function (httpRequest) {
                document.querySelectorAll('.csssuper')[0].style.display = 'none';
                // $('.csssuper').slideUp();
                showMsg('warn', '该运单是所在系统判断，接口来查询失败！');
              });
            }else if ('DD'===mulcssstr){
              let that = this;
              this.axios.post(
                OMS_SERVER_NAME+"oms-ltl-web/uaporder/queryAllByOrderNumber.action",
                {"uapOrderVO.ltlOrder.orderNumber":multiplequerywaybillno}
              ).then(function (res) {
                let r = res.data;
                console.log("渲染订单查询方法开始！");
                if(r==null||r===''||r.uapOrderVO.uapSearchOrder==null){
                  document.querySelectorAll('.csssuper-order')[0].style.display = 'none';
                  document.querySelectorAll('.search-null')[0].style.display = 'block';
                  that.searchNull = true;
                  that.$emit('search-null',that.searchNull);
                }else{
                  document.querySelectorAll('.search-null')[0].style.display = 'none';
                  document.querySelectorAll('.csssuper-order')[0].style.display = 'block';
                  that.$emit('search-order',r.uapOrderVO.uapSearchOrder);
                  // $(".csssuper-order .orderAcceptURL").click(function(){
                  //   let omsXTstr = "零担订单受理";
                  //   if(r.uapOrderVO.uapSearchOrder.hasOwnProperty('orderType')){
                  //     if("exp"===r.uapOrderVO.uapSearchOrder["orderType"]){
                  //       omsXTstr = "快递订单受理";
                  //     }
                  //   }
                  //   let omsXTurl = "";
                  //   if(r.uapOrderVO.uapSearchOrder.hasOwnProperty('orderAcceptURL')){
                  //     omsXTurl = r.uapOrderVO.uapSearchOrder["orderAcceptURL"];
                  //   }
                  //   orderOMSTo(omsXTstr,omsXTurl,multiplequerywaybillno);
                  // });
                }

              }).catch(function (httpRequest) {
                document.querySelectorAll('.csssuper-order')[0].style.display = 'none';
                showMsg('warn', '订单系统维护中 !');
                console.log("渲染订单查询方法失败！");
              });
            }else if ('QT'===mulcssstr){
              document.querySelectorAll('.csssuper-order')[0].style.display = 'none';
              document.querySelectorAll('.csssuper')[0].style.display = 'none';
              document.querySelectorAll('.search-null')[0].style.display = 'block';
            }
          },
          queryAddressListByDept(){
            this.axios.post(CUSTOM_SERVICE_URL + "addressList/queryByDepartmentcode",{
              departmentcode: this.search.value
            }).then((res) => {
              console.log("渲染部门信息查询方法开始！");
              let rs = res.data;
              let length = rs.length;
              // deptThreeContent("","","");
              let deptThreeContent = {
                oaDepartSearchName:'',
                oaDepartSearchDepartPhone:'',
                oaDepartSearchAddress:''
              }
              this.$emit('get-deptThreeContent',deptThreeContent);

              //查看注视
              // let departAdmin_tbody = '';
              // let childDepart_tbody = '';
              // $(".oaDepartSearch .departAdmin .departAdmin_tbody").empty();
              // $(".oaDepartSearch .childDepart_table .childDepart_tbody").empty();
              if(length<1){
                // $(".oaDepartSearch").slideToggle("500");
                document.querySelectorAll('.oaDepartSearch')[0].style.display = 'none';
                document.querySelectorAll('.search-null')[0].style.display = 'block';
                // $(".oaDepartSearch").slideUp("500");
                // $(".search-null").slideDown("500");
                // checktip($('.multiplequerywaybillno'), '无法检索查询结果');
              }else{
                document.querySelectorAll('.oaDepartSearch')[0].style.display = 'block';
                document.querySelectorAll('.search-null')[0].style.display = 'none';
                // $(".search-null").slideUp("500");
                // $(".oaDepartSearch").slideDown("500");
                let childDep = rs[0]._childDepartments.length;
                let nowUser = rs[0]._users.length;
                let nametop = rs[0]._addrss;

                if(""===nametop||null==nametop){
                  nametop="抱歉，该部门还没有添加地址哦";
                }

                // deptThreeContent(rs[0]._fullname,rs[0]._phone,nametop);
                // oaDepartSearchName:'',
                //   oaDepartSearchDepartPhone:'',
                //   oaDepartSearchAddress:''
                deptThreeContent.oaDepartSearchName = rs[0]._fullname;
                deptThreeContent.oaDepartSearchDepartPhone = rs[0]._phone;
                deptThreeContent.oaDepartSearchAddress = nametop;
                this.$emit('get-deptThreeContent',deptThreeContent);
                //将部门人员包装成数组然后传递到父组件
                var personAddressListInfo = [];
                if(nowUser>0){
                  for (let x = 0; x < nowUser; x++) {
                    let picpeoplexy = "pt";
                    let peoplesex = rs[0]._users[x].sex;
                    if('女' === peoplesex){
                      picpeoplexy = 'wm';
                    }
                    let onePerson = {
                      lastname:rs[0]._users[x].lastname,
                      mobile:rs[0]._users[x].mobile,
                      jobtitle:rs[0]._users[x].jobtitle,
                      workcode:rs[0]._users[x].workcode,
                      departmentname:rs[0]._users[x].departmentname,
                      departmentphone:rs[0]._users[x].departmentphone,
                      picsex:picpeoplexy,
                    }
                    personAddressListInfo.push(onePerson);
                    // let $PersonAddressListInfo =
                    //   $(PersonAddressListInfoHtml.replace(
                      //     "{lastname}",
                    //     rs[0]._users[x].lastname
                    //   ).replace(
                      //     "{mobile}",
                    //     rs[0]._users[x].mobile
                    //   )
                    //   .replace(
                      //     "{jobtitle}",
                    //     rs[0]._users[x].jobtitle
                    //   ).replace(
                      //     "{workcode}",
                    //       rs[0]._users[x].workcode
                    //     )
                    //   .replace(
                      //     "{departmentname}",
                    //     rs[0]._users[x].departmentname
                    //   ).replace(
                      //     "{departmentphone}",
                    //       rs[0]._users[x].departmentphone
                    //     ).replace(
                      //       "{picsex}",
                    //       picpeoplexy
                    //     )
                    //   );
                    // $PersonAddressListInfo.push({})
                    // $PersonAddressListInfo = {}
                    // $(".oaDepartSearch .departAdmin .departAdmin_tbody").append($PersonAddressListInfo);
                  }
                  this.$emit('get-personAddressListInfo',personAddressListInfo);
                }else{
                  this.$emit('get-personAddressListInfo','');
                  // $(".oaDepartSearch .departAdmin .departAdmin_tbody").empty();
                }

                if(childDep>0){
                  for (let x = 0; x < childDep; x++) {

                    let name = rs[0]._childDepartments[x]._addrss;

                    if(""===name||null==name){
                      name="抱歉，该部门还没有添加地址哦";
                    }

                    // let $DeptAddressListInfo = $(
                    //   DeptAddressListInfoHtml.replace("{_fullname}",
                    //     rs[0]._childDepartments[x]._fullname)
                    //   .replace("{_phone}",rs[0]._childDepartments[x]._phone)
                    //   .replace("{_addrss}",name)
                    // );
                    let deptAddressListInfo = {
                      _fullname:rs[0]._childDepartments[x]._fullname,
                      _phone:rs[0]._childDepartments[x]._phone,
                      _addrss:name
                    }
                    // $(".oaDepartSearch .childDepart_table .childDepart_tbody").append($DeptAddressListInfo);
                    this.$emit('get-deptAddressListInfo',deptAddressListInfo);
                  }
                }else{
                  this.$emit('get-deptAddressListInfo','');
                  // $(".oaDepartSearch .childDepart_table .childDepart_tbody").empty();
                }
                showContentPerson(nowUser);
                showContentDept(childDep);
              }
            });
          },
          queryAddressListByName(){
            // var AddressListInfoHtml = returnAddressListPerson();
            let name = this.search.value;
            let isWhoWhoWho = checkPeople(name);
            let a1 = "";
            let a2 = "";
            let a3 = "";
            if('KB'==isWhoWhoWho){
              showMsg('warn', '请输入查询内容！');
            }else{
              
              if('GH'==isWhoWhoWho){
                a1 = name;
              }else if('SJ'==isWhoWhoWho){
                a3 = name;
              }else if('XM'==isWhoWhoWho){
                a2 = name;
              }
              this.axios.post(CUSTOM_SERVICE_URL+"addressList/queryByPeople",{
                workcode: a1,lastname: a2 ,mobile: a3
              }).then((res)=>{
                // $(".oaClerkSearch .oaClerkSearch_tbody").empty();
                let rs = res.data;
                let length = rs.length;
                if(length<1){
                  // $(".oaClerkSearch").slideUp("500");
                  // $(".search-null").slideDown("500");
                  document.querySelectorAll(".oaClerkSearch")[0].style.display = "none";
                  document.querySelectorAll(".search-null")[0].style.display = "block";
                      // checktip($('.multiplequerywaybillno'), '无法检索查询结果');
                  this.$emit('get-personInfo','');
                }else{
                  // $(".search-null").slideUp("500");
                  // $(".oaClerkSearch").slideDown("500");
                  document.querySelectorAll(".search-null")[0].style.display = "none";
                  document.querySelectorAll(".oaClerkSearch")[0].style.display = "block";
                  for (var x = 0; x < length; x++) {
                    var picpeoplexy = "pt";
                    var peoplesex = rs[x].sex;
                    if('女' == peoplesex){
                      picpeoplexy = 'wm';
                  }
                    
                  let personInfo = {
                    lastname:rs[x].lastname,
                    mobile:rs[x].mobile,
                    jobtitle:rs[x].jobtitle,
                    workcode:rs[x].workcode,
                    departmentname:rs[x].departmentname,
                    departmentphone:rs[x].departmentphone,
                    picsex:picpeoplexy
                  }   
                  console.log("渲染人员信息查询方法开始！");        
                  this.$emit('get-personInfo',personInfo);
                        // var $AddressListInfo = $(AddressListInfoHtml
                        // .replace("{lastname}",rs[x].lastname)
                        // .replace("{mobile}",rs[x].mobile)
                        //     .replace("{jobtitle}",rs[x].jobtitle)
                        //     .replace("{workcode}",rs[x].workcode)
                        //     .replace("{departmentname}",rs[x].departmentname)
                        //     .replace("{departmentphone}",rs[x].departmentphone)
                        //     .replace("{picsex}",picpeoplexy)
                        //     );

                        // $(".oaClerkSearch .oaClerkSearch_tbody").append($AddressListInfo);
                  }
                }
                  });
              // $.ajax({
              //       url: CUSTOM_SERVICE_URL + "addressList/queryByPeople",
              //       type: "POST",
              //       data: {workcode: a1,lastname: a2 ,mobile: a3},
              //       success: function (rs) {
              //         $(".oaClerkSearch .oaClerkSearch_tbody").empty();
              //         var length = rs.length;
              //         if(length<1){
              //           $(".oaClerkSearch").slideUp("500");
              //               $(".search-null").slideDown("500");
              //               // checktip($('.multiplequerywaybillno'), '无法检索查询结果');
              //         }else{
              //               $(".search-null").slideUp("500");
              //               $(".oaClerkSearch").slideDown("500");
              //           for (var x = 0; x < length; x++) {
              //             var picpeoplexy = "pt";
              //             var peoplesex = rs[x].sex;
              //             if('女' == peoplesex){
              //               picpeoplexy = 'wm';
              //             }
                          
              //           var $AddressListInfo = $(AddressListInfoHtml.replace("{lastname}",rs[x].lastname).replace("{mobile}",rs[x].mobile)
              //               .replace("{jobtitle}",rs[x].jobtitle).replace("{workcode}",rs[x].workcode)
              //               .replace("{departmentname}",rs[x].departmentname)
              //               .replace("{departmentphone}",rs[x].departmentphone)
              //               .replace("{picsex}",picpeoplexy)
              //               );

              //               $(".oaClerkSearch .oaClerkSearch_tbody").append($AddressListInfo);
              //           }
              //         }
                      
              //           console.log("渲染人员信息查询方法开始！");
                        

              //       },
              //       error: function (httpRequest) {
              //         // $(".oaClerkSearch").slideToggle("500");
              //           console.log("渲染人员信息查询方法失败！");
              //             showMsg("warn","系统维护中！");
              //       }
              //   });
            }
          }
        },
        components:{
          inputBlank:inputBlank
        }
    }
</script>
<style lang="less">
  .selemenuBox-deppon{
    div{
      height: auto;
    }
    .ivu-input-icon{
      color: #faaf19;
      cursor: pointer;
    }
    .ivu-input-group{
      top: 10px;
      height: 28px;
      background: red;
    }
    .ivu-select-single .ivu-select-selection{
      height: 28px;
    }
    .ivu-input-group-append, .ivu-input-group-prepend{
      background-color: #d7d8e0;
      padding: 0;
      height: 28px;
      border-radius: 0;
      border: none;
    }
    .ivu-input-group-prepend .ivu-select{
      margin: 0;
    }
  }

</style>
